<%-- 
    Document   : Rotacion
    Created on : 23-jun-2012, 0:42:27
    Author     : Mariita
--%>

<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>


<%@page import="Unit.*" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="CSS/style.css" />
        <title>Rotaciones</title>
          <script src="JSCal2-1.9/src/js/jscal2.js"></script>
    <script src="JSCal2-1.9/src/js/lang/en.js"></script>
    <link rel="stylesheet" type="text/css" href="JSCal2-1.9/src/css/jscal2.css" />
    <link rel="stylesheet" type="text/css" href="JSCal2-1.9/src/css/border-radius.css" />
    <link rel="stylesheet" type="text/css" href="JSCal2-1.9/src/css/steel/steel.css" />
        
    </head>
    <body>
         <div id="main_container">
  <div class="header">
    <div id="logo"><a href="Info.jsp"><img src="images/logo.png" alt="" width="162" height="54" border="0" /></a></div>
    <div class="right_header">
      <div class="top_menu"> <a href="Info.jsp" class="login">login</a> <a href="Inicio.jsp" class="sign_up">signup</a> </div>
      <div id="menu">
        <ul>
          <%
    
String usu=application.getAttribute("usuario").toString();          
if(usu.equalsIgnoreCase("admin"))
{
%>
          <li><a href="nuevoMedico.jsp">Administrador</a></li>
          <li><a class="current" href="Medicina.jsp">Medico</a></li>
          <li><a href="Info.jsp">Servicios</a></li>
          <li><a href="Info.jsp">Paciente</a></li>
<%}%>

          <%        
if(usu.equalsIgnoreCase("medico"))
{
%>
          <li><a class="current" href="Medicina.jsp">Medico</a></li>
          <li><a href="Info.jsp">Servicios</a></li>
          <li><a href="Info.jsp">Paciente</a></li>
<%}%>

          <%        
if(usu.equalsIgnoreCase("cliente"))
{
%>
          <li><a class="current" href="Info.jsp">Servicios</a></li>
          <li><a href="Info.jsp">Paciente</a></li>
<%}%>
        </ul>
      </div>
    </div>
  </div>
  <div id="middle_box">
    <div class="middle_box_content"><img src="images/banner_content.jpg" alt="" /></div>
  </div>
 
             <form  id ="datos" method="post" action="Rotacion.jsp" >
             
       <%
       
//ArrayList <Medico> list =new ArrayList<Medico>();
asigMedico listar=(asigMedico) application.getAttribute("maestrar");


if(request.getParameter("boton") != null)
       {
    
    listar.asignarMedico(request.getParameter("nombre"), request.getParameter("centro"), request.getParameter("fecha"));
    
}

%>      
             
             
         
            
  <div id="main_content">
      
    <div class="box_content">
      <div class="box_title">
        <div class="title_icon"><img src="images/doctor.png" alt="" border="0" height="40" width="40"/></div>
        <h2>Asignacion <span class="dark_blue">Medico</span></h2>
      </div>
       
      <div class="box_text_content"> 
          
          
        <div class="box_text_content"> <img src="images/checked.gif" alt="" class="box_icon" />
            <div class="box_text"> Medico: 
        
        
          <select name="nombre">
              <%

  for (Medico med : listar.medicos)  
{
%>
<option><% out.print(med.nombre); %></option>
              <%}%>
          </select>
          </div>
          </div>
          
          
       <div class="box_text_content"> <img src="images/checked.gif" alt="" class="box_icon" />
            <div class="box_text"> Centro: 
        
        
          <select name="centro">

<option>Centro 1</option>
<option>Centro 2</option>
<option>Centro 3</option>
             
          </select>
          </div>
          </div>
          
      </div>
    </div>
          
          
          
          
    <div class="box_content">
      <div class="box_title">
        <div class="title_icon"><img src="images/calendar.gif" alt="" /></div>
        <h2>Calendario <span class="dark_blue"> Asignacion</span></h2>
      </div>
      <div class="box_text_content"> 

            <div class="box_text"> Fecha: 
        
    <input size="30" id="f_date1" name="fecha"/><button id="f_btn1">...</button><br />

    <script type="text/javascript">//<![CDATA[
      Calendar.setup({
        inputField : "f_date1",
        trigger    : "f_btn1",
        onSelect   : function() { this.hide() },
        showTime   : 12,
        dateFormat : "%Y-%m-%d %I:%M %p"
      });
    //]]></script>
                
          </div>
          
          
          
       <div class="box_text_content"> 
            <div class="box_text">  
        
        <input type="submit" value="Asignar"  name="boton" style='border-color:transparent; background:Info.jsp759f1b '/>
    
          </div>
          </div>
          
        </div>

    </div>
          
          
    
        <div class="box_content">
      <div class="box_title">
        <div class="title_icon"><img src="images/medical.png" alt="" border="0" height="32" width="32"/></div>
        <h2>Otros <span class="dark_blue">Enlaces</span></h2>
      </div>
      <div class="box_text_content"> <img src="" alt="" class="box_icon" />
        <div class="box_text"> Consulta de enfermedades y sus medicamentos. </div>
        <a href="Medicina.jsp" class="details">Enfermedades</a>
         </div>
            <%
if(usu.equalsIgnoreCase("admin"))
{     
%>
      <div class="box_text_content"> <img src="" alt="" class="box_icon" />
        <div class="box_text"> Rotaciones de los medicos en los diferentes centros. </div>
        <a href="Rotacion.jsp" class="details">Rotaciones</a> </div>
 <%}%>
    </div>
          

    
    
          <table border="1">
              <thead>
                  <tr>
                      <th>Medico</th>
                      <th>Centro</th>
                      <th>Fecha</th>
                  </tr>
              </thead>
              <tbody>
                  
                  <%
   for(Medico med:listar.medicos)
             {

%>
                  
                  
                  <tr>
                      <td><%out.print(med.nombre); %></td>
                      <td><%out.print(med.centro); %></td>
                      <td><%out.print(med.fecha); %></td>
                  </tr>
                  
               <%}%>
              </tbody>
          </table>

    
  
          
          
    
    <div class="clear"></div>
  </div>
</form>
          
  <div id="footer">
    <div class="copyright"> <img src="images/footer_logo.gif" alt="" /> </div>
    <div class="center_footer">&copy; Medical Clinic 2008. All Rights Reserved</div>
  
  </div>
</div>
    </body>
</html>
